// 类的继承

class Animals {
    name:string
    constructor(name:string) {
        this.name = name
    }

    sayHello(data:string) {
        return data
    }
}


class Animals1 {
    age:number = 2
}

// extends 继承
class Panda extends Animals {

  
}
class Cat extends Animals {
   
}

const cat = new Cat('猫')
const panda = new Panda('熊猫')
console.log(cat)
console.log('叫声：',cat.sayHello('喵喵'));
console.log('叫声：',panda.sayHello('嗡嗡'));